package com.Ugent.Minerva;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;


public class Account extends Activity {
	public static final String PREFS ="Prefs";
	static SharedPreferences prefs;
	SharedPreferences.Editor editor;
	
	Button logOut;
    Button account;
    @Override
    public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          System.gc();
          setContentView(R.layout.account);
          setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
          prefs = getSharedPreferences(PREFS, 0);
          editor = prefs.edit();

          //button to log out and clear prefs
          logOut = (Button) findViewById(R.id.logOut);
          logOut.setOnClickListener(new View.OnClickListener() {
                public void onClick(View v) {
                	editor.clear();
                	editor.commit();
                	startActivity(new Intent(getApplicationContext(), login.class));
                }
          });
}
}